<template>
	<view class="page-contents">

		<div class="role pt-50">
			<div class="tabItem flex-center mb-30" v-for="(item, index) in tabList" :key="index"
				@click="changeTab(item)">
				<image class="icon" :src="item.icon" mode="" />
				<div class="ml-24">
					<div class="fontS32 color-0d font-bold lh-50">{{ item.title }}</div>
					<div class="mt-6 lh-43 fontS28 color-6d">{{ item.desc }}</div>
				</div>
				<div class="iconfont icon-youjiantou ml-auto color-6d"></div>
			</div>

		</div>
	</view>
</template>

<script>

let timein = null;
const api = require("@/api/api.js").api;
let timeout;
let allTime = 60;
let app = getApp();
import systemInfoUtil from "@/utils/systemInfoUtil.js";
let _this;
export default {
	data() {
		return {
			tabList: [
				{
					icon: 'https://xingangtong.oss-cn-beijing.aliyuncs.com/common/企业icon.png',
					title: '我是企业',
					desc: '我要找人办事/购买服务',
					role: '03'
				},
				{
					icon: 'https://xingangtong.oss-cn-beijing.aliyuncs.com/common/牛人icon.png',
					title: '我是牛人',
					desc: '我要赚钱/找工作',
					role: '02'
				}
			]
		};
	},
	computed: {
		userInfo() {

			return this.$store.getters.userInfo || {};
		},


	},
	methods: {
		changeTab(item) {
			this.userInfo.userType = item.role
			this.$store.commit("SET_USERINFO", this.userInfo);
			uni.switchTab({
				url: '/pages/home/home'
			})

		}
	}
};
</script>

<style lang="scss" scoped>
.page-contents {
	height: 100vh;
	width: 100%;
	padding: 30upx;
	background: #fff !important;

	.tabItem {
		background: #F7F8FA;
		padding: 46upx;
		border-radius: 16upx;
		height: 192upx;

		.icon {
			width: 100upx;
			height: 100upx;
		}
	}

}
</style>